import instacne from "../request";
import type { Ref } from "vue";

/**
 *  订单设置 提交
 */
interface IorderSettingItem {
  commentOvertime?: number;
  confirmOvertime?: number;
  finishOvertime?: number;
  flashOrderOvertime?: number;
  id: number;
  id2: number;
  normalOrderOvertime?: number;
}
const orderSetting = (data: IorderSettingItem) => {
  return instacne.post(`/orderSetting/update/${data.id}`, data);
};

/**
 *  订单设置 详情 回显
 */
const orderSettingDetail = (data: IorderSettingItem) => {
  return instacne.get(`/orderSetting/${data.id}`, data);
};

export { orderSetting, orderSettingDetail };
export type { IorderSettingItem };
